export default {
  name: 'public-banner',
  props: ["bannerlist"],
  data() {
    return {
      swiperOption: {
        // some swiper options/callbacks
        // 所有的参数同 swiper 官方 api 参数
        // ...
        autoplay: {
          delay: 4000
        },
        pagination: {
          el: '.swiper-pagination',
          clickable: true,
        }
      },
      bannerList: this.bannerlist
    };
  },
  created(){
    this.bannerList =this.bannerlist;
  },
  watch: {
    bannerlist(nv,ov){
      this.bannerList =nv;
    }
},
  mounted() {
    // current swiper instance
    // 然后你就可以使用当前上下文内的swiper对象去做你想做的事了
    this.swiper.slideTo(0, 1000, false)
  },
  methods: {

  },
  computed: {
    swiper() {
      return this.$refs.mySwiper.swiper
    }
  }
}